package com.boot.exception;

import com.boot.enums.ResultEnum;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class CustException extends RuntimeException {
    private Integer code;

    public CustException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        log.info("BolgExcetion:{}",resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public CustException(Integer code, String message) {
        super(message);
        this.code = code;
    }
}
